<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>com.drake.net.body</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../";</script><script type="text/javascript" src="../../scripts/sourceset_dependencies.js" async="async"></script><link href="../../styles/style.css" rel="Stylesheet"><link href="../../styles/logo-styles.css" rel="Stylesheet"><link href="../../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../../styles/main.css" rel="Stylesheet"><script type="text/javascript" src="../../scripts/clipboard.js" async="async"></script><script type="text/javascript" src="../../scripts/navigation-loader.js" async="async"></script><script type="text/javascript" src="../../scripts/platform-content-handler.js" async="async"></script><script type="text/javascript" src="../../scripts/main.js" async="async"></script>  </head>
  <body>
    <div id="container">
      <div id="leftColumn"><a href="../../index.html">
          <div id="logo"></div>
        </a>
        <div id="paneSearch"></div>
        <div id="sideMenu"></div>
      </div>
      <div id="main">
        <div id="leftToggler"><span class="icon-toggler"></span></div>
<script type="text/javascript" src="../../scripts/main.js"></script>        <div class="main-content" id="content" pageIds="Net::com.drake.net.body////PointingToDeclaration//1281733757">
          <div class="navigation-wrapper" id="navigation-wrapper">
            <div class="breadcrumbs"><a href="../../index.html">Net</a>/<a href="index.html">com.drake.net.body</a></div>
            <div class="pull-right d-flex">
              <div id="searchBar"></div>
            </div>
          </div>
          <div class="cover ">
            <h1 class="cover"><span>Package com.</span><wbr></wbr><span>drake.</span><wbr></wbr><span>net.</span><wbr></wbr><span>body</span></h1>
          </div>
          <div class="tabbedcontent">
            <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="Types">Types</button><button class="section-tab" data-togglable="Functions">Functions</button></div>
            <div class="tabs-section-body">
              <h2 class="">Types</h2>
              <div class="table" data-togglable="Types"><a data-name="-544676977%2FClasslikes%2F1281733757" anchor-label="NetRequestBody" id="-544676977%2FClasslikes%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="-net-request-body/index.html">NetRequestBody</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-544676977%2FClasslikes%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">class <a href="-net-request-body/index.html">NetRequestBody</a>(body: <span data-unresolved-link="okhttp3/RequestBody///PointingToDeclaration/">RequestBody</span>, progressListeners: <a href="https://developer.android.com/reference/kotlin/java/util/concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a>&lt;<a href="../com.drake.net.interfaces/-progress-listener/index.html">ProgressListener</a>&gt;?) : <span data-unresolved-link="okhttp3/RequestBody///PointingToDeclaration/">RequestBody</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="1516304095%2FClasslikes%2F1281733757" anchor-label="NetResponseBody" id="1516304095%2FClasslikes%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="-net-response-body/index.html">NetResponseBody</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1516304095%2FClasslikes%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">class <a href="-net-response-body/index.html">NetResponseBody</a>(body: <span data-unresolved-link="okhttp3/ResponseBody///PointingToDeclaration/">ResponseBody</span>, progressListeners: <a href="https://developer.android.com/reference/kotlin/java/util/concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a>&lt;<a href="../com.drake.net.interfaces/-progress-listener/index.html">ProgressListener</a>&gt;?, complete: () -&gt; <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>?) : <span data-unresolved-link="okhttp3/ResponseBody///PointingToDeclaration/">ResponseBody</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Functions</h2>
              <div class="table" data-togglable="Functions"><a data-name="851494119%2FFunctions%2F1281733757" anchor-label="fileName" id="851494119%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="file-name.html">fileName</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="851494119%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/MultipartBody.Part///PointingToDeclaration/">MultipartBody.Part</span>.<a href="file-name.html">fileName</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="851494119%2FFunctions%2F1281733757" anchor-label="fileName" id="851494119%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="851494119%2FFunctions%2F1281733757" anchor-label="fileName" id="851494119%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>获取Content-Disposition里面的filename属性值 可以此来判断是否为文件类型</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="-1375431293%2FFunctions%2F1281733757" anchor-label="name" id="-1375431293%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="name.html">name</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1375431293%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/MultipartBody.Part///PointingToDeclaration/">MultipartBody.Part</span>.<a href="name.html">name</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="-1375431293%2FFunctions%2F1281733757" anchor-label="name" id="-1375431293%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="-1375431293%2FFunctions%2F1281733757" anchor-label="name" id="-1375431293%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>获取Content-Disposition里面的字段名称</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="-2034082788%2FFunctions%2F1281733757" anchor-label="peekBytes" id="-2034082788%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="peek-bytes.html">peekBytes</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2034082788%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/RequestBody///PointingToDeclaration/">RequestBody</span>.<a href="peek-bytes.html">peekBytes</a>(byteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a> = 1024 * 1024): <span data-unresolved-link="okio/ByteString///PointingToDeclaration/">ByteString</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="1389066201%2FFunctions%2F1281733757" anchor-label="peekBytes" id="1389066201%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="1389066201%2FFunctions%2F1281733757" anchor-label="peekBytes" id="1389066201%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>复制一段指定长度的字符串内容</div></div>
<div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/ResponseBody///PointingToDeclaration/">ResponseBody</span>.<a href="peek-bytes.html">peekBytes</a>(byteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a> = 1024 * 1024): <span data-unresolved-link="okio/ByteString///PointingToDeclaration/">ByteString</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="-1951005431%2FFunctions%2F1281733757" anchor-label="peekBytes" id="-1951005431%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="-1951005431%2FFunctions%2F1281733757" anchor-label="peekBytes" id="-1951005431%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>复制一段指定长度的字符串内容</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="-1615544294%2FFunctions%2F1281733757" anchor-label="toNetRequestBody" id="-1615544294%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="to-net-request-body.html">toNetRequestBody</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1615544294%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/RequestBody///PointingToDeclaration/">RequestBody</span>.<a href="to-net-request-body.html">toNetRequestBody</a>(listeners: <a href="https://developer.android.com/reference/kotlin/java/util/concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a>&lt;<a href="../com.drake.net.interfaces/-progress-listener/index.html">ProgressListener</a>&gt;? = null): <a href="-net-request-body/index.html">NetRequestBody</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="353936936%2FFunctions%2F1281733757" anchor-label="toNetResponseBody" id="353936936%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="to-net-response-body.html">toNetResponseBody</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="353936936%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/ResponseBody///PointingToDeclaration/">ResponseBody</span>.<a href="to-net-response-body.html">toNetResponseBody</a>(listeners: <a href="https://developer.android.com/reference/kotlin/java/util/concurrent/ConcurrentLinkedQueue.html">ConcurrentLinkedQueue</a>&lt;<a href="../com.drake.net.interfaces/-progress-listener/index.html">ProgressListener</a>&gt;? = null, complete: () -&gt; <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>? = null): <a href="-net-response-body/index.html">NetResponseBody</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="2128785983%2FFunctions%2F1281733757" anchor-label="value" id="2128785983%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="value.html">value</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2128785983%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <span data-unresolved-link="okhttp3/MultipartBody.Part///PointingToDeclaration/">MultipartBody.Part</span>.<a href="value.html">value</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="2128785983%2FFunctions%2F1281733757" anchor-label="value" id="2128785983%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="2128785983%2FFunctions%2F1281733757" anchor-label="value" id="2128785983%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>将<span data-unresolved-link="okhttp3/MultipartBody.Part/body/#/PointingToDeclaration/">MultipartBody.Part.body</span>作为字符串返回 如果<span data-unresolved-link="okhttp3/MultipartBody.Part///PointingToDeclaration/">MultipartBody.Part</span>有指定fileName那么视为文件类型将返回fileName值而不是文件内容</div></div>
</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="footer"><span class="go-to-top-icon"><a href="#content"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span></div>
      </div>
    </div>
  </body>
</html>

